﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using Utility.DataSystem;
using TerrainSystem;

namespace DataSystem
{
	public class TileSettingObject : SettingScriptableObject<TileSetting>
	{
		public GameObject prefab;

		public bool autoPrefab = true;
		public GameObject model;

		public TileSetting.TerrainLayers terrainLayer = TileSetting.TerrainLayers.Platform;
		public bool canBuild = true;
		public float surfaceHeight = 0;

		public bool canPass;
		public bool canFly;
		public Texture texture;
		public Color color = Color.white;
	}

	public class TileSetting : Setting<TileSettingObject>
	{
		public enum TerrainLayers
		{
			Ground,
			Platform,
		}



		public GameObject Prefab => SettingObject.prefab;

		public TerrainLayers TerrainLayer => SettingObject.terrainLayer;
		public bool CanBuild => SettingObject.canBuild;

		public float SurfaceHeight => SettingObject.surfaceHeight;

		public Color Color => SettingObject.color;
	}
}